<!-- el-upload.html -->
<div ng-class="class">
  <div class="el-upload el-upload--text" ng-class="{'el-upload--drag': dragEnabled}">
    <!-- 拖拽上传区域 -->
    <div class="el-upload-dragger" ng-show="dragEnabled" ng-model="dragActive" el-dropzone on-drop="onDrop(files)"
      ng-class="{'is-dragover': dragActive}">
      <i class="el-icon-upload"></i>
      <div class="el-upload__text">
        将文件拖到此处，或<em>点击上传</em>
      </div>
    </div>
  
    <!-- 传统上传按钮 -->
    <div ng-show="!dragEnabled" class="el-upload__button">
      <button type="button" class="el-button el-button--primary" ng-click="triggerFileSelect($event)">
        <i class="el-icon-upload"></i>
        <span>点击上传</span>
        <input type="file" class="el-upload__input" id="fileInput" multiple="{{multiple}}" accept="{{accept}}"
          style="display: none;">
      </button>
    </div>
  </div>
  <ng-transclude></ng-transclude>
  <!-- <div class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div> -->
  <!-- 文件列表 -->
  <ul class="el-upload-list el-upload-list--text" ng-if="showFileList">
    <li tabindex="0" class="el-upload-list__item is-success" ng-repeat="file in fileList track by $index">
      <a class="el-upload-list__item-name"><i class="el-icon-document"></i>{{file.name}}({{file.size | fileSize}})
      </a><label class="el-upload-list__item-status-label"><i
          class="el-icon-upload-success el-icon-circle-check"></i></label><i class="el-icon-close" ng-click="handleRemove(file, index)"></i>
    </li>
  </ul>
</div>